The Design of Web APIs by Arnaud Lauret
Author:Arnaud Lauret [Arnaud Lauret]
Language: eng
Format: epub, pdf
Publisher: Manning Publications
Published: 2019-10-22T16:00:00+00:00
The first step consists of identifying the main concept (or resource) for each goal. You begin by identifying the main noun in the goal. For example, both the list accounts and read account goals deal with the concept of an account. Then you identify the CRUD (Create, Read, Update, Delete) action that best represents the goal’s main verb. For these two goals, it is Read; therefore, these fall under the account:read scope. Note that the scope-naming convention {concept}:{action} is quite common but might not be too user-friendly. Such scope names are usually accompanied by a helpful description, such as
"account:read": list accounts and access detailed information about those
Unfortunately, this technique does not always reduce the number of scopes. For the beneficiary-related goals, we still end up with three scopes matching the list beneficiaries, create a beneficiary, and delete a beneficiary goals. In some cases, this can even cause problems.
The update a transfer and validate an uncommon transfer goals both update a money transfer and, therefore, could be grouped under the transfer:update scope. But that would not be very secure! By allowing a consumer to update a money transfer, we would also allow them to use the far more critical validate an uncommon transfer goal. In this case, it would be wiser to keep this goal under a specific transfer:validate scope that uses a custom action instead of a CRUD one.
Partitioning based on concepts and actions can produce scopes that are still flexible, but a little less fine-grained and complex. This must be done carefully, however, to avoid inadvertently granting undue access to critical goals, and the improvement is fairly minimal. Let’s think back to what we learned in chapter 7 about designing a concise and well-organized API. Can we use those concepts to try to organize the goals into coarser scopes and provide a more usable solution?
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12609)
Hello! Python by Anthony Briggs(9931)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9806)
The Mikado Method by Ola Ellnestam Daniel Brolund(9797)
Dependency Injection in .NET by Mark Seemann(9354)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8317)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7776)
Grails in Action by Glen Smith Peter Ledbrook(7710)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7573)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7241)
Microservices with Go by Alexander Shuiskov(7004)
Practical Design Patterns for Java Developers by Miroslav Wengner(6914)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6868)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6431)
Angular Projects - Third Edition by Aristeidis Bampakos(6282)
The Art of Crafting User Stories by The Art of Crafting User Stories(5801)
NetSuite for Consultants - Second Edition by Peter Ries(5729)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5549)
Kotlin in Action by Dmitry Jemerov(5078)
